<?  


$ingame = $this->session->userdata('ingame');
$offgame = $this->session->userdata('deltager');

//print_r($offgame['userid']);
//print_r($this->session->all_userdata());



if($naeste_session != 0)
{ 	?>

	<?	//if($ingame['ingame_id'] != 0)
		//{	?>

		

	
	<? //echo anchor("deltager/dashboard/".$ingame['ingame_id']."/alle_sessioner","se alle sessioner","class='rubrik'"); ?>	
		<h3 class="rubrik">Næste session spilles <? echo date('d-M-Y ',$next_session_offgame_start)." kl. ".date('H:i',$next_session_offgame_start); ?></h3>
	<div style="padding:10px;border:solid 1px #BEBAA0;">

	<h1> <? echo anchor("almanak/side/".$next_session_id,$next_session_name,"class='ink'"); ?></h1>


	<form action="<? echo base_url(); ?>core/rediger/begivenhed_deltager/tilfoej/<? echo $next_session_id; ?>/<? echo $player_character_id; ?>" method="post">	

		
		<?  $er_jeg_tilmeldt = "nej";
			foreach($rollespillere as $r3)
			{
				
				if($player_character_id == $r3['id'])
				{
					$er_jeg_tilmeldt = "ja";
				}

			}

			if($er_jeg_tilmeldt == "nej")
			{
				echo "<div style='float:right;text-align:center;'>";
					echo "<h2 class='rubrik'>Meld dig til</h2>";			
		?>			<input type="submit" class="terninger" value="" title="Tilmeld <?echo $player_character_navn;?> <?// echo $naeste_session['navn'];?>" >
		<? 		echo "</div>";
			}
			else
			{
				echo "<div style='float:right;text-align:center;'>";
				echo "<h2 class='rubrik'>Du er tilmeldt</h2>";
				echo anchor
				(
					"core/rediger/begivenhed_deltager/slet/".$next_session_id."/".$player_character_id."/session/".$kampagne_id,
					" ",
					"class='terninger_frameld' title='Frameld ".$player_character_navn." ".$next_session_id." '"
				);	

				echo "</div>";
			
			}
		?>




	
			<input type="hidden" name="vinkel" value="session">
			<input type="hidden" name="kampagne_id" value="<? echo $kampagne_id; ?>">
			<input type="hidden" name="deltager_id" value="<? echo $offgame['userid']; ?>">

			</form>






			
		
			
	

	
		<br>
		<h4 class="rubrik">
			Tilmeldte
		</h4>
	


		<p class="rubrik" style="padding:0px 0px 10px 0px;font-weight:bold;">
			<?
			//print_r($rollespillere);
			foreach($rollespillere as $r2)
			{
				echo anchor("deltager/profil/".$r2['id_rollespiller'],$r2['rollespiller'],"class='rubrik'")," aka ".anchor("almanak/side/".$r2['id'],$r2['karakter'],"class='ink'")."<br/>";
			}

			?>
		</p>
	</div>
	<?	
}
else
{
	echo "Der er ingen session i denne kampagne";
}

	?>

